﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
using System.Configuration;

namespace PagesList
{
    class ConnectManager
    {
        protected ConnectManager()
        {

        }


        public static OleDbConnection GetSystemConnect()
        {
            if (connect != null)
            {
                return connect;
            }

            connetionString = ConfigurationManager.ConnectionStrings["LisdbConnectionString"].ConnectionString;
            connect = new OleDbConnection(connetionString);
            connect.Open();          

            return connect;
        }

        private static OleDbConnection connect;
        private static string connetionString;
    }
}
